package com.itheima.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CheckgroupCheckitemMapper {

    /**
     * 根据检查项id删除中间表数据
     * @param id
     */
    @Delete("delete from t_checkgroup_checkitem where checkitem_id = #{id}")
    void deleteByCheckitemId(Long id);

    /**
     * 根据检查组id删除中间表数据
     * @param id
     */
    @Delete("delete from t_checkgroup_checkitem where checkgroup_id = #{id}")
    void deleteByCheckgroupId(Long id);


    void insert(Long checkgroupId, Long checkitemId);
}
